;; Nukefile for Nu framework and nush, the Nu shell

;; source files
(set @c_files     (filelist "^objc/.*\.c$"))
(set @m_files     (filelist "^objc/.*\.m$"))
(set @nu_files 	  (filelist "^nu/.*\.nu$"))
(set @frameworks  '("Cocoa" "Nu" "Carbon" ))

(set @cflags " -g -fobjc-gc")

(if (or (isSnowLeopard) (isLion))
    (then
         (set @ldflags " -framework Cocoa -framework Nu -framework Carbon -framework mach_inject_bundle -all_load ")
         (set @arch '("x86_64" "i386")))
    (else
         (set @ldflags " -framework Cocoa -framework Nu -framework Carbon -linject -L../libinject -all_load ")))

(set @mflags " -fobjc-gc ")

;; bundle description
(set @bundle "NuConsole")
(set @bundle_identifier "nu.programming.console")

(compilation-tasks)
(bundle-tasks)

(task "default" => "bundle")

(task "clobber" => "clean" is
      (SH "rm -rf #{@bundle}.bundle"))
